package com.example.demo.controller;

import com.example.demo.entity.Reserve;
import com.example.demo.service.ReserveService;
import com.example.demo.util.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (Reserve)表控制层
 *
 * @author makejava
 * @since 2025-04-22 14:35:15
 */
@RestController
@RequestMapping("/reserve")
public class ReserveController {
    /**
     * 服务对象
     */
    @Resource
    private ReserveService service;

    // 查询预定信息
    @RequestMapping(value = "/selectReserve", method = RequestMethod.GET)
    public Result selectReserve(Reserve reserve){
        return service.selectReserve(reserve);
    }

    // 新增预定信息
    @RequestMapping(value = "/insertReserve", method = RequestMethod.GET)
    public Result insertReserve(Reserve reserve){
        return service.insertReserve(reserve);
    }

    // 确定入住
    @RequestMapping(value = "/reserveUpdateLive", method = RequestMethod.GET)
    public Result reserveUpdateLive(Reserve reserve){
        return service.reserveUpdateLive(reserve);
    }

    // 取消预定
    @RequestMapping(value = "/cancelReserve", method = RequestMethod.GET)
    public Result cancelReserve(Reserve reserve){
        return service.cancelReserve(reserve);
    }

    // 订单作废
    @RequestMapping(value = "/abrogateReserve", method = RequestMethod.GET)
    public Result abrogateReserve(Reserve reserve){
        return service.abrogateReserve(reserve);
    }

}

